<?php
$customerTreatmentReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'CustomerTreatmentReport');
?>
<h2>Relat&oacute;rio Atendimento ao Cliente</h2>
<section id="TreatmentReport">
    <table id="TreatmentReport_ReportMoreOpenedCalled" class="Report">
        <thead>
            <tr>
                <th colspan="2">Clientes que mais abriram chamados</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>N&ordm; de Camados</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($customerTreatmentReport['CHAMADOS_CRIADOS'] as $Customer): ?>
                <tr>
                    <td><?=$Customer->getCustomerName()?></td>
                    <td><?=$Customer->getReport(0)?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="TreatmentReport_ReportMorePhoneCalled" class="Report hide">
        <thead>
            <tr>
                <th colspan="2">Clientes com mais chamados telefônicos</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>N&ordm; de Chamados</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($customerTreatmentReport['CHAMADOS_TELEFONICOS'] as $Customer): ?>
                <tr>
                    <td><?=$Customer->getCustomerName()?></td>
                    <td><?=$Customer->getReport(0)?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="TreatmentReport_ReportMoreClosedCalled" class="Report hide">
        <thead>
            <tr>
                <th colspan="2">Clientes com mais chamados fechados</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>N&ordm; de Camados</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($customerTreatmentReport['CHAMADOS_FECHADOS'] as $Customer): ?>
                <tr>
                    <td><?=$Customer->getCustomerName()?></td>
                    <td><?=$Customer->getReport(0)?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="TreatmentReport_ReportMorePerfectCalled" class="Report hide">
        <thead>
            <tr>
                <th colspan="2">Clientes com mais chamados perfeitos</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>N&ordm; de Camados</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($customerTreatmentReport['CHAMADOS_PERFEITOS'] as $Customer): ?>
                <tr>
                    <td><?=$Customer->getCustomerName()?></td>
                    <td><?=$Customer->getReport(0)?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <div class="pagination">
        <a href="#" rel="ReportMoreOpenedCalled" class="selected borderRadios">Mais Chamados Abertos</a>
        <a href="#" rel="ReportMorePhoneCalled" class="nonselected borderRadios">Mais Chamados Telefônicos</a>
        <a href="#" rel="ReportMoreClosedCalled" class="nonselected borderRadios">Mais Chamados Fechados</a>
        <a href="#" rel="ReportMorePerfectCalled" class="nonselected borderRadios">Mais Chamados Perfeitos</a>
    </div>
</section>